define(['./getbg'], function(getbg) {
    function gettitle(str) {
        str = str || '';
        return /[\u4e00-\u9fa5]/.test(str) ? str.substr(-2) : str.substr(0, 2);
    }

    return function (obj, str) {
        obj.outerHTML = '<div style="width: 30px; height: 30px; line-height: 30px; float: left; text-align: center; border-radius: 100%; margin-left: 5px; font-size: 12px; color: #fff; background: '+ getbg(str) +'">'+ gettitle(str) +'</div>'
    }
})